const fs = require('fs')
const express = require('express')
const cors = require('cors')

const app = express()
app.use(cors())

app.get('/data',(req,res) => {
  const str = fs.readFileSync('./db/todos.json')
  res.send(str)
})

app.get('/first',(req,res) => {
  const str = fs.readFileSync('./db/todos.json')
  res.send(str)
})

app.listen(8080)